Get

Function

This API is used to get parameter for AI > Setup > Line Crossing Detection page.

Request Message

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capabilities of the device.
string arrayEach array bit represents a channel with a string.
DVR/NVR need;
IPC only use CH1
page_type“ChannelConfig”,
“AlarmConfig”
stringThe data used to distinguish whether it is a channel configuration page or an alarm configuration page

Sample:

POST API/AI/Setup/LCD/Get HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "ChannelConfig"}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectChannel Information JSON show as follow Table Table 3
page_type“ChannelConfig”,
“AarmConfig”
stringIt is used to distinguish whether it is the data of the channel configuration page or the alarm configuration page, it is only required when setting
channel_maxintMaximum number of channels

Table 3

ParameterRangeTypeDescription
CH1Json ObjectJSON show as follow Table Table 4
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 4

ParameterRangeTypeDescription
status"Offline","Online",“Nonsupport”stringChannel online status, only for digital channels.
Note: When the channel is online, there is no such field
alarm_out“Local->1”…
”Local->x”
“IP_CH1->1”…
“IP_CH1->2”…
” IP_CHx->1”
” IP_CHx->2”
The number of channels depends on the capabilities of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera:
Local->1:open, null value: close
latch_time"10","20","40","60"stringAlarm output time
record_enabletrue, falseboolRecording channel switching
record_channel“CH1”…”CH1x”
“IP_CH1”…
“IP_CH1x”
“WIFI_CH1”…”
arrayAlarm output channel
Channel alarm linkage switch.
post_recording"30","60","120","300"stringVideo delay time
send_emailtrue, falseboolSend email switch
ftp_picture_uploadtrue, falseboolChannel capture FTP upload switch(NVR dedicated)
ftp_video_uploadtrue, falseboolChannel video FTP upload switch(NVR dedicated)
picture_to_cloudtrue, falseboolPicture upload switch(NVR dedicated)
video_to_cloudtrue, falseboolVideo cloud upload switch(NVR dedicated)
full_screenboolFullScreen switch(NVR dedicated)
buzzer"0","10","20","40","60"stringBuzzer sounding time(NVR dedicated)
show_messageboolShow message switch(NVR dedicated)
switchtrue, falseboolswitch,false: close true: open
sensitivity1-4intDetection sensitivity
sensitivity_ex1-100intOptimized detection sensitivity
target_validity1-4intConfidence
min_pixel64-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
detection_type"Motion"
"Pedestrian"
"Vehicle"
"Pedestrian &Vehicle"
stringDetection type, human shape and vehicle shape (normal detection type)
detection_type“Pedestrian”
"Motor Vehicle"
"Non-motorized Vehicle"
arrayDetection type, human figure, motor vehicle, non-motor vehicle (machine is not human type) (ipc intelligent second generation dedicated)
iva_lines0:no line
1:draw a line
intWhether there will be a line in the preview and playback (ipc smart second generation only)
rule_infoJSON objectSingle Channel Information JSON show as follow Tabl Table 5
schedule_list0-8json array(Consumer NVR docking IPC POE package only) Arming schedule data,show as Table Table 8 .
mutual_exclusion"PVD"json arrayThe collection of mutex functions that have been enabled at present. Note: If there is a mutex function that is already enabled, it will be brought when Get. If it is not enabled or there is no mutual exclusion, it is not necessary to pass this field
schedule_enableboolSchedule mode
ptz_operation_supportbool(Ball machine use)Supports the ptz operation
sceneIndoor,Outdoorstringscene
light_linkageboolWhite light linkage alarm
tracking_linkboolTracking linkage switch(Ball machine use)
enforcerlight_linkageboolRed and blue indicator linkage alarm
siren_linkageboolAlarm sound linkage alarm
http_listeningboolhttp event push
scheduleObjectThe schedule is displayed as followsTable 10
default_timeout1-120000intSession timeout (range usage)

Table 5

ParameterRangeTypeDescription
rule_number1ObjectRule number 1,Information JSON show as follow Table Table 6
rule_number2ObjectRule number 1,Information JSON show as follow Table Table 6
rule_number3ObjectRule number 1,Information JSON show as follow Table Table 6
rule_number4ObjectRule number 1,Information JSON show as follow Table Table 6

Table 6

ParameterRangeTypeDescription
rule_switchboolRule switch
rule_type"A->B",
"B->A",
"A<-->B"
stringRule direction
rule_lineObjectEach channel has a maximum of 64 point coordinates, that is, 32 lines. If it is an accompanying line, only the first line is used. If it is a perimeter, these 8 lines are connected in sequence to form a closed figure.Information JSON show as follow Table Table 7

Table 7

ParameterRangeTypeDescription
x10-704shortx1 Coordinate points
y10-576shorty1 Coordinate points
x20-704shortx2 Coordinate points
y20-576shorty2 Coordinate points

Table 8

ParameterRangeTypeDescription
cloud_video_is_used0~MAX_PARA_CHN_NUMarrayThe channel number for which the cloud video upload function has been enabled
max_cloud_video_upload_numMAX_CLOUD_VIDEO_RECORD_NUMintThe maximum number of channels supported by cloud video upload

Table 9

ParameterRangeTypeDescription
enabletrue, falseboolIs the current schedule in effect
start_time0 – 1439(23*60+59)intSchedule start time (minutes relative to 00:00)
end_time0 – 1439(23*60+59)intSchedule end time (minutes relative to 00:00)
weekday"Sunday"
"Monday"
"Tuesday"
"Wednesday"
"Thursday"
"Friday"
"Saturday"
arrayIndicates the day of the week when the current schedule takes effect, multiple choices are allowed

Table 10

ParameterRangeTypeDescription
schedule_type"SendEmail"
"FtpPicUpload"
"CloudPicUpload"
"Record"
"AlarmOut"
"FtpVdUpload"
"CloudVdUpload"
"FloodLight"
"Siren"
"EnforcerLight"
stringSchedule type
weekObejctWeekly information such as Table 11

Table 11

ParameterRangeTypeDescription
day"Sun"
"Mon"
"Tue"
"Wed"
"Thu"
"Fri"
"Sat"
stringday
timeinttime

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {"channel_info": {"CH1": {
        "status": "Online",
        "switch": true,
        "sensitivity": 2,
        "detection_type": [],
        "rule_info": {
            "rule_number1": {
                "rule_switch": true,
                "rule_type": "A<-->B",
                "rule_line": {
                    "x1": 406,
                    "y1": 165,
                    "x2": 396,
                    "y2": 482
                }
            },
            "rule_number2": {
                "rule_switch": true,
                "rule_type": "A<-->B",
                "rule_line": {
                    "x1": 263,
                    "y1": 171,
                    "x2": 254,
                    "y2": 483
                }
            },
            "rule_number3": {
                "rule_switch": false,
                "rule_type": "A->B",
                "rule_line": {
                    "x1": 0,
                    "y1": 0,
                    "x2": 0,
                    "y2": 0
                }
            },
            "rule_number4": {
                "rule_switch": false,
                "rule_type": "A->B",
                "rule_line": {
                    "x1": 0,
                    "y1": 0,
                    "x2": 0,
                    "y2": 0
                }
            }
        }
    }}}
}

Error Code

See Response Messages Body and Common error_code for more information.